$(document).ready(function() {
  var defaultPage = 'library';

  // Render Page  
  fp_showPage(defaultPage);
  
  // Initiate Table
  $('#example').dataTable({
    "sDom": "Rlfrtip"
  });

  $("#importTabs, #settingsTabs, #licenseTabs").tabs();
  $('input[type=submit]').button();
  $('#menu').menu();
  
  $(window).bind('hashchange', fp_hashParse);
  
  createPlayer();
  
  $(window).bind('resize', windowResize);
});


/** TAGS **/

// type: fileObject, googleMusic, youTube
// location: referrence to file
function readTagsFromFile(type, location) {
  
}



// data: artistName, albumName, trackName, trackYear, trackNumber, hash, lyricsBlob
// tags: general, lyrics
function getTagsFromService(data, tags) {

  if ('general' in tags) {
    
  }
  
  
  if ('lyrics' in tags) {
    
  }
  
}



// data: artistName, albumName, trackName, trackYear, trackNumber, hash, lyrics
// location: file, database
function storeTags(data, location) {
  
  
  
  switch (location) {
    case 'file':
      
    break;
    
    case 'database':
      
    break;    
  }
}




/** LIBRARY **/

// parameters:  artistName, albumName, trackName, trackYear, trackNumber, hash, lyricsBlob
function getTracksFromDatabase(parameters) {
  
}


function populateTable(tracks) {
  
}



/** PLAYER **/

function getLyrics(properties) {
  lyrics = '';

  return lyrics;
}


/** OTHER **/

// format: csv
// location: disk, googleDrive
function exportLibrary(format, location) {
  
}

function importLibrary(format, data) {
  
}